package club.janna.springboot.study.bootstrap;

import club.janna.springboot.study.annotation.EnableHelloAutoProxy;
import club.janna.springboot.study.service.AopHelloService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;

@ComponentScan(basePackages = "club.janna.springboot.study.service")
@EnableHelloAutoProxy
public class HelloAopBootstrap {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(HelloAopBootstrap.class);
        AopHelloService helloService = context.getBean(AopHelloService.class);
        System.out.println(helloService.sayHello());
        System.out.println(helloService.sayBye());
        System.out.println(helloService.sayOther());
    }
}
